/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GamePlay;

import FrameWork.IPlay;
import javax.microedition.lcdui.Graphics;

/**
 *
 * @author ThanhTri
 */

public class GamePlay extends IPlay {
    public GamePlay (Graphics _Graphics){
        super(_Graphics);
        
        m_CurState = new State_Start(this);
        m_NextState = new State_Start(this);       
           
    }
    public void Init (){
        m_CurState.Init();
    }
    public void Update (float _Time){
        if(m_CurState.getID() != m_NextState.getID()){
            m_CurState.Destroy();
            m_CurState = m_NextState;
            m_CurState.Init();
        }else{
             m_CurState.Update(_Time);
        }
       
    }
    public void Render (){
        m_CurState.Render();
    }
    public void Destroy (){
        
    }
}
